package za.ac.lance.inheritance.subclass;

import za.ac.lance.inheritance.Animal;
import za.ac.lance.inheritance.superclass.Mammal;

/**
 * File Name: Cat.java
 * Version:
 * Description:
 * Package: za.ac.lance.inheritance.subclass
 * Author: Lance
 * Date: Feb 22, 2012
 */
public class Cat extends Mammal implements Animal
{

    private int meowFrequency;

    public Cat(int meowFrequency, String colour, int temperature)
    {
        super(colour, temperature);
        this.meowFrequency = meowFrequency;
    }

    public int getMeowFrequency()
    {
        return meowFrequency;
    }

    public void setMeowFrequency(int meowFrequency)
    {
        this.meowFrequency = meowFrequency;
    }

    @Override
    public void action()
    {
        for (int i = 0; i < meowFrequency; i++)
        {
            System.out.println("Cat meowing");
        }
    }
}
